﻿namespace NetFx.AST
{
  using System;
  using System.Text;
  using System.Collections;
  using System.Collections.Generic;

  using NetFx.SMIL.Definitions;
  using NetFx.SMIL.References;

  public class SyntaxParameter
  {
    #region Statics
    public static SyntaxParameter of(string name, Type type)
    {
      return new SyntaxParameter(name, type);
    }
    #endregion
    #region Fields
    protected string name = string.Empty;
    protected Type type = typeof(object);
    #endregion
    #region Properties
    public virtual string Name
    {
      get
      {
        return this.name;
      }
    }
    public virtual Type Type
    {
      get
      {
        return this.type;
      }
    }
    #endregion
    #region Constructors
    public SyntaxParameter(string name,Type type)
    {
      this.name = name;
      this.type = type;
    }
    #endregion
  }

  public enum SyntaxSlotType
  {
    SyntaxTextOnly = 0,
    SyntaxAndType = 1,
    SyntaxOptional = 2,
    SyntaxRepeatable = 4,
    SyntaxOptionalRepeatableType = 7
  }
  [System.AttributeUsage(AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
  public class SyntaxSlotAttribute : Attribute
  {

    protected string syntaxText =string.Empty;
    protected SyntaxSlotType slotType = SyntaxSlotType.SyntaxTextOnly;

    // This is a positional argument.
    public SyntaxSlotAttribute(string syntaxText)
    {
      this.syntaxText = syntaxText;
    }
    public virtual string SyntaxText
    {
      get
      {
        return this.syntaxText;
      }
    }
    public virtual SyntaxSlotType SlotType
    {
      get
      {
        return this.slotType;
      }
      set
      {
        this.slotType = value;
      }
    }

  }


  [System.AttributeUsage(System.AttributeTargets.All, Inherited = false, AllowMultiple = false)]
  public class SyntaxDefinitionAttribute : System.Attribute
  {
    #region Fields
    protected string _positionalString;
    #endregion
    #region Properties
    public virtual string PositionalString
    {
      get
      {
        return this._positionalString;
      }
    }
    #endregion
    #region Constructors
    // This is a positional argument.
    public SyntaxDefinitionAttribute(string positionalString)
    {
      this._positionalString = positionalString;
    }
    #endregion

  }
}
